For two equations the problem actually becomes very simple as the qeustion is equivalent to whether or not there exists a vector $\begin{pmatrix}x\\y\end{pmatrix}\in\mathbb{Z}^2$ with
$$\begin{pmatrix}a&b\\p&q\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}c\\m\end{pmatrix}.$$
If the determinant of $A=\begin{pmatrix}a&b\\p&q\end{pmatrix}$ is non-zero, we have a unique real solution, which we can easily calculate via calculating $A^{-1}$. If this solution is already integer, we have a unique integer solution, else we dont.
If the determinant of $A$ is zero, there are two more cases to differentiate. Either $a=b=p=q=0$, in which case $m=c=0$ as well and there are infinitely many integer solutions.
Or the determinant of $A$ is zero and at least one of $a,b,p,q$ is non-zero. In that case the kernel of $A$ is $1$-dimensional and the equations therefor admit either no or infinitely many real solutions. If there are infinitely many real solutions and $s$ is such a solution, then the set of all real solutions can be described by
$$\left\lbrace v\in\mathbb{R}^2\ \Big|\ v=s+w\text{, where }w\in\text{ker}(A)\right\rbrace.$$
Since the kernel is 1-dimensional, it is generated by a single vector $k\in\mathbb{R}^2$, thus in the last case the set of equations admits an integer solution if and only if there exists a $\lambda\in\mathbb{R}$ with
$$s+\lambda \cdot k\in\mathbb{Z}^2,$$
and it is unique if and only if there is no $\mu\in\mathbb{R}$ with $\mu\cdot k\in\mathbb{Z}^2$. Both of those equations are easy to solve.