How do I type the prime and double prime characters on OS X?
Using the Character Viewer, search for "Prime". You can then click "Add to Favorites" for more convenient access. 



In Mavericks, the following shortcut is helpful to bring up the character viewer: 


  Control + Command + Spacebar


Click the button in the top right corner to switch between the "Characters" window and "Character Viewer". Note: to get that button or the search bar to appear, you'll need to scroll up.