Surprising applications of cohomology The concept of cohomology is one of the most subtle and powerful in modern mathematics. While its application to topology and integrability is immediate (it was probably how cohomology was born in the first place), there are many more fields in which cohomology is at least a very interesting point of view. Group cohomology is a famous one, and for example it helps in studying extensions.
Here are good points about the "philosophy" behind cohomology.
Here are very good, but advanced, ideas on what cohomology "really is".
I would like to ask something a little different: 

What are the most unexpected applications of cohomology, or of cohomology-related ideas?  Why is cohomology useful/important/interesting when applied to such problems?

Bonus point for real-world applications, or at least outside algebra/geometry/theoretical physics.
Update: Oops, looks like there is a very similar question here, with beautiful answers.
 A: It all depends on what one means by surprising. This is maybe not so surprising in hindsight, but to me, that the Weil conjectures are proven by étale cohomology is a fantastic application. Cohomology has had a great impact on questions in number theory and surely (different form of cohomologies!) will continue to an important role.
A: Dan Isaksen formulated basic arithmetic in terms of cohomology:
(cf. https://pdfs.semanticscholar.org/b44b/eb7ff396be62e548e4a6dc39df0bdf65e593.pdf)
Viewing "carrying" as a cocycle is something that most people don't think about.  At least, most people I've talked to who know about cohomology don't think of arithmetic in this way.
A: *

*This article is a wonderful primer introduction to cohomology. It cites several applications (outside pure mathematics):



Applications of cohomology and Hodge theory are plentiful, we find
  them in numerical analysis [3], peridynamics [30], topological data
  analysis [26], computational topology [33], graphics [66], image
  processing [70], robotics [45], sensor networks [65], neuroscience
  [53], and many other areas in physical science and engineering. But
  these applications are not ‘surprising’ in the sense that they all
  concern physics, geometry, or topology — areas that gave birth to
  cohomology and Hodge theory in the first place. What we find somewhat
  unexpected are recent applications of cohomology and Hodge theory to
  game theory [15] and ranking [43]



*There is also an interesting post of T.Tao about cohomology application to dynamical systems
A: Here is a ridiculous application of cohomology: a proof of $$\sum_{j=0}^n {n \choose j} (-1)^j=0.$$
Let $X=(S_1)^n$ be the $n$-dimensional torus. By the Künneth formula, $H^j(X, \mathbf Q)$ has dimension ${n \choose j}$. Therefore, the Euler characteristic of $X$ is
$$\chi(X)=\sum_{j=0}^n (-1)^j \mathrm{dim}_{\mathbf Q}H^j(X, \mathbf Q) = \sum_{j=0}^n {n \choose j} (-1)^j.$$
On the other hand, $X$ is a compact Lie group; let $\sigma$ be an infinitesimal translation $X \to X$. By the Lefschetz fixed point theorem, $\chi(X)$ is equal to the number of fixed points of $\sigma$, i.e., $0$.
A: Close to a real-world application is maybe the application to mixed finite elements.
Finite element
exterior calculus
In a nutshell: Instead of solving numerically $$\Delta u =0,$$
one approximates the solution of
$$
\mathrm{div}~ u = \sigma \quad \text{and} \quad \mathrm{grad}~ \sigma = 0.
$$
Both formulations lead to the same solutions $u$, but surprisingly, there is a high risk to get a completely wrong solution by a naive finite element approximation. 
(Slides with pictures, examples (and the theory))
Mixed finite elements are for example used in elasticity or fluid dynamics,
where the pressure $p$ a Lagrange multiplier, lives naturlly in different spaces than the deformation $\varphi$ of the material. It was known before, that the choice of the approximation spaces of $p$ and $\varphi$ is crucial. Numerical solutions might exist, but they can differ tremendously from the real solution, also for high resolution simulations. (Lack of stability.)
the use of (co)homology leads to a unified understanding of this area. First, you have to find a Hilbert complex such that the associated Hodge Laplace equation is the PDE of your interest.
Finding the right complex or combining several complexes to build a new one, involves application of tools from homological algebra.
If the numerical approximation implies a bounded morphism between two complexes which preserves the cohomology groups, then the corresponding finite elements are stable! (Of course, there are some typical assumptions for finite elements which also have to be statisfied.)
I love the fact, that here numerical mathematics benefits from an more abstract approach and actually this technique also helped to solve previously unsolved problems!
