use ast_atomic_fetchadd_int for incrementing resultcount