Dynamic Self-Consistency: Leveraging Reasoning Paths for Efficient LLM Sampling