7x7 is always 49 regardless of how many frames you actually use, so:
SetSpriteAnimation(boss.id,xframe,yframe,49)
otherwise, you control your "47" via the additional, optional
PlaySprite() parameters:
PlaySprite( iSpriteIndex, fFps, iLoop, iFromFrame, iToFrame )
many sprite sheets will have multiple animations inside, so:
PlaySprite(MySprite,10,1,1,10 ) //Run
PlaySprite(MySprite,5,0,11,15) //Jump
PlaySprite(MySprite,5,0,16,20) //Fall
PlaySprite(MySprite,5,0,21,25) //Die
all using a single sprites sheet, for example, while that sheet could be 10x10 (100 frames).
say 1-25 are used by MySprite, perhaps 26-50 represent YourSprite, 60-100 may never be used.
you get the idea.