Make counts work on objects