This quote comes within the another scene in which we see Hamlet putting his "antic disposition on." Hamlet has revealed his plan to act crazy as a way to throw off the people at court and discover if Claudius is, in fact, guilty of murdering King Hamlet. At the beginning of this scene, Hamlet is acting as if he doesn't know the people to whom he is speaking, though he would have known them his whole life. When Hamlet first walks in the room Polonius asks "Do you know me, my lord?" Hamlet's response is "You are a fishmonger." He is being funny in his mistake, and it is also a possible allusion to a story by Ovid in which a fisherman uses his daughter for personal gain, quite possibly like Polonius is using Ophelia to find out more about Hamlet.
Polonius, being logical, denies the statement. After several other events, later in the scene, Hamlet starts in again with Polonius about Ophelia. He calls Polonius Jephthah, a biblical allusion to another man who sacrificed his daughter. Polonius says, "If you call me Jephthah, my lord, I have a daughter I love passing well." Hamlet, not really satisfied with that answer and wanting to get another dig at Polonius says, "Nay, that follows not." What he means is that just because you have a daughter doesn't necessarily mean you love her. One fact doesn't automatically follow the other. Hamlet is pointing out the fact that if Polonius is using Ophelia as a means to spy on him, then he must not love her that much. He is too willing to put her in a dangerous position or a position where at the minimum her feelings could be hurt.