counting errors