From pega 7.4 ,by default number of partitions for kafka and stream dataset are 20(no configuration is needed). If you want to change this default number of partitions, go to kafka folder (in application server folder) and open connect-distributed.properties file and change the value of num.partitions.
By configuring partitioning you can ensure that related records are sent to the same partition. If no partition keys are set, the Kafka data set randomly assigns records to partitions.
Please go through below link for more information related to kafka data set creation.