Playing in a tournament, my partner had a downhill shot from a bunker. He shanked the shot and his ball hit me in the shin, bounced on the green and into the hole. Was that a birdie or not?
— Phil Dupont, via Facebook
Unfortunately, that shot does not count as a birdie, but, believe it or not, it does still count. According to Rule 19-2, if a player's ball is accidentally deflected or stopped by his partner, the player incurs a penalty of one stroke and must then play the ball as it lies. In this case, the ball lies in the hole, so your partner made an (accidental) par.
Keep in mind that you've had a bit of luck, since this Rule was changed relatively recently. Prior to 2008, this would have cost your partner two strokes in stroke play, or the loss of the hole for both of you in a match play event. You're also fortunate that the USGA rescinded the controversial "HORSE Rule" in 2005, which would have cost you the hole unless your partner called a bank shot.