A non-flag arithmetic regularity lemma and counting lemma