as sheriff, andy is the chief law enforcement officer in the county, yet most of his activity is in and around the town of mayberry, and there is no evidence of a separate city police force. both the town and the county are named mayberry, so andy is the chief law enforcement officer for both. these working conditions, plus his reliance on a single deputy (and no clerk or jailer) indicate that the county is very small in both size and population; however, in the episode "mountain wedding", andy and barney get up at four o'clock in the morning to get an "early start" on their trip to the darling's cabin, which is described as being "up in the mountains". when they arrive, it is full daylight, so it could be inferred that mayberry county is larger than originally thought and with mountainous areas, but sparsely populated. andy and barney both work the courthouse during daytime hours, and rotate shifts at night. the length of night duties is never specified; however, it appears the only time either spends all night at the courthouse is when a prisoner, other than regular inmate otis campbell, is incarcerated. one confusing aspect of andy's authority however, is his apparent subservience to the town mayor; a plot device which is utilized in several episodes throughout the course of the series - including season 3's "the cow thief" - but which makes no sense in real life, since both are elected officials. additionally, since andy is elected countywide, while the mayor is a town official, his authority would actually - in most areas - exceed that of the mayor. this apparent dichotomy is never addressed during the run of the show.