Atom-Trapping And Photon-Counting Experiments With Optical Nanofibers