TODO: fix count like on ajax requests