How to count the number of values in a multi value field with the Paragraphs module?
If you're theming the paragraph field using a theme template or a preprocess function, an $id or $variables['id'] variable is available that has the count of the current paragraph item.