refactored missing count