There shouldn't be any problem with the code I posted, I imagine you have something like:
Because you haven't posted any piece of code I'm assuming that you use doublebuffering for drawing it all, so don't draw the text directly to the 'screen' default bitmap.
static int points=0;
function drawpoints(BITMAP screenbuffer)
A second thing, read the Allegro documentation, in the function call you posted you are using black text with black background... I think you won't see the points with that color combination.
If your program still crashes the problem should be from other part, not this one (I suppose).