Prepare the chicken by removing any giblets in the cavities and patting as dry as you can with a paper towel (I do this in my sink for easy clean-up).
Lay the sliced onion on the bottom of your slow cooker.
Season the chicken with the salt and pepper on all sides and inside the cavity as well.
Lay the chicken on top of the sliced onions. Pour 4 cups water in the side of the crockpot, avoiding pouring on top of the chicken so you don't remove the salt and pepper (skip this if you don't want stock). Lay the sprigs of rosemary on top of the chicken, if using.
Cook on high for four hours.
Remove the rosemary sprigs and discard. Remove the chicken carefully, as it will be fall-off-the-bone tender, to a rimmed baking sheet or carving board. Allow to rest for at least 10 minutes before carving/cutting up.
Strain the stock through a mesh sieve into storage containers (I use a ladle to scoop it out and pour through the sieve, and discard the onions at the end).
For a larger or smaller bird, you may need to adjust the cooking time. A chicken under 4 lbs. will probably only need 3 hours on high, whereas a larger one may take 4 1/2 or 5 hours to cook. Make sure you check the internal temperature to see if it's 165 if you are in any doubt.
To get crispy skin: place the chicken under the broiler in your oven for 5-10 minutes after cooking to crisp the skin a bit. Otherwise, I recommend removing and discarding the skin.
Storage: store the meat from the chicken for up to 5 days in an airtight container in your fridge. Store the chicken stock for up to 5 days in your fridge or up to 6 months in your freezer in an airtight container.
I used my 6 qt. slow cooker for this. A smaller one may not work, unless you have a very small chicken. A larger one will be fine.