Season the whole chicken all over with kosher salt.
Cut the onions into quarters and chop the carrots and celery. Cut garlic heads in half.
Combine chicken, cut vegetables, black peppercorns, and dill in a large pot. Cover with cold water and bring to a simmer.
Carefully lift chicken out of pot and set aside to cool.
Remove wings and legs from chicken, then cut breasts away from carcass.
Discard skin from legs and breasts, return the carcass and other parts to the pot.
Continue simmering the soup while occasionally skimming fat until reduced by an inch or two.
Shred cooled chicken breasts into bite-sized pieces.
Slice remaining celery and carrots. Finely chop dill to yield ¼ cup.
Strain soup into another pot, discarding solids.
Bring strained broth to a boil, add ditalini, and cook for 5 minutes.
Shred meat off the chicken legs and discard bones.
Add shredded chicken, sliced carrots and celery to the pot, and cook until pasta and vegetables are tender.
Remove from heat, stir in dill, and season to taste with salt and pepper.
Divide soup among bowls and top with more pepper.