make count of total result work

Add comments