How many peaks in my mountain range?
CJam (32 26 24 21 bytes)

0q~0]e`1f=2ew::&gt;2,/,(


Expected input is space-separated numbers.

Online demo ; full test suite (expected output is a 1 per test case).

Thanks to Martin for informing me that the current version of CJam improves one of the operators used, saving 2 chars; and for a further 3-char saving.

Dissection

Two phases: deduplicate, then identify local maxima in each set of three.

0q~0]      e# Put the input in an array wrapped in [0 ... 0]
e`1f=      e# Use run-length encoding to deduplicate
2ew::&gt;     e# Map [a b c ...] to [(a&gt;b) (b&gt;c) ...]
2,/        e# Split on [0 1], which since we've deduplicated occurs when (a&lt;b) (b&gt;c)
,(         e# Count the parts and decrement to give the number of [0 1]s