issue #21229: count has to be inside data
issue #21229: bugfix