sql; implemented count. save-update and count tests work