counting subsequences accepted