Thanks Headaxe, but I wanted to spawn the mob already with a scoreboard score, not set its score once it has been spawned. I did eventually find an effective way round this. I wasn't sure how to set the score of a mob whose NBT data matches that of the data in the scoreboard or testfor command, but thanks to the help of people above I can use this. I found a way around my problem as a result.