If you are talking about total number of objects the state can hold, that depends on the executor memory you have on your cluster apart from rest of the memory required for processing. The state is stored in hdfs and retrieved while processing the next events.
If you maintain million objects with each 20 bytes , it would be 20MB, which is pretty reasonable to maintain in a executor allocated with few GB memory. But if you need heavy objects to be stored you need to do the math. And also it will have a cost in transferring this data back and forth to hdfs checkpoint location.