Count in short sets of strokes. Counting may be 1-2-3-4, 1-2-3-4, 1-2-3-4… used like a musician might use it to gradually build up ability to hold a more complex pattern within that rhythm. (Ever watched a group of drummers build a complex rhythm together?). Stroke counting helps you slip into keep a rhythm that the whole body can follow.
You can coordinate the BEEP and count with different moments in the stroke at different points in the body: entry, full extension point, catch moment, hand exit (start of recovery), hip rotation, breath moment, foot press, etc.
Keep the number count within your attention span. That could be just a few strokes, or a few hundred.
For some it may mean counting as high as one can hold breath while breathing skill is weak and disruptive to the whole stroke (assuming you have breathing as one of your skill projects too!). This may be as few as 6 strokes.
For others with integrated breathing skill, that count might some number that fits within the length of the pool (your SPL according your Optimal Stroke Count).