Following the answer to this question, I defined example and solution environments using the thmtools package, which I want to share numbering with the other environments in my document. Here is my MWE:
\documentclass{book}
\usepackage[margin=.75 in]{geometry}
\usepackage[english = american]{csquotes}
\usepackage{amsmath,amsfonts,amssymb,amsthm,color,srcltx,enumitem,bm,cancel,thmtools}
\usepackage{setspace}
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}
%Plain environments:
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{result}[theorem]{Result}
%Definition environments:
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
%Remark environments:
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
%Example and solution environments (from https://tex.stackexchange.com/questions/19947/example-solution-environment):
\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
headfont=\normalfont\bfseries,
notefont=\mdseries, notebraces={(}{)},
bodyfont=\normalfont,
postheadspace=1em,
numberwithin=section,
sharenumber=theorem
]{exstyle}
\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
headfont=\normalfont\bfseries,
notefont=\mdseries, notebraces={(}{)},
bodyfont=\normalfont,
postheadspace=1em,
headpunct={},
qed=$\blacktriangleleft$,
numbered=no,
sharenumber=theorem
]{solstyle}
\declaretheorem[style=exstyle]{example}
\declaretheorem[style=solstyle]{solution}
\begin{document}
\part{Part 1}
\chapter{Chapter 1}
\section{Section 1}
\begin{definition}
Definition goes here
\end{definition}
\begin{theorem}
Theorem goes here
\end{theorem}
\begin{proposition}
Proposition goes here
\end{proposition}
\begin{lemma}
Lemma goes here
\end{lemma}
\begin{result}
Result goes here
\end{result}
\begin{example}
Example goes here
\end{example}
\end{document}
Notice that I added sharenumber=theorem, an idea I got from the thmtools documentation. The problem is, adding this causes a LaTeX error "Missing \begin{document}". Removing the line sharenumber=theorem makes the error go away, but then I lose the shared numbering.

sharenumbernotsharecounterin last line? I think no such key defined by the package!? – touhami Sep 30 '15 at 06:52sharenumber=theoremnot one of 3 keys mentionned but it works, however if you trysharecounter=theoremyou will get error (at least I do) – touhami Sep 30 '15 at 07:36