One feature in the REST API not in the JSON RPC (afaict) is that you can fetch a page of headers (up to 2k) at a time via rest but only single headers via RPC. This patch adds a count argument to the rpc to allow for similar functionality without having to make N RPC calls (more efficient).
The API i chose is if the count = 0, then a single header will be returned (matching the previous behavior). If count > 0, then the returned result will either be a concatenated hex string array or a json object array. Perhaps a bikesheddable semantic, but I think it's reasonable to do it this way given that consumers of the API probably never actually want to return 0 headers, but may want the return type to be consistently an array whether 1 or 2 or 1000 headers are requested.