Fix bug with empty string counting