if you are using the .NET API, you can retrieve this info via DocumentIndexFieldTable.Row.Count() ( see Documentation
Doing so in the Workflow Designer is probably not possible without getting all the values and counting them with a loop.
Hope this helps.
Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant